﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="POption_Manage.aspx.cs"
    MasterPageFile="~/Admin/Admin.Master" Inherits="TimKen.Web.Admin.PAttribute.POption_Manage" %>

<asp:Content runat="server" ContentPlaceHolderID="ContentLinkAction" ID="link">
    <span class="action-span"><a href="POption_Add.aspx">
        <%=GetLangString("AddNewOption")%></a></span>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentTitle" runat="server" ID="Content2">
    <%=GetLangString("MenuProductOption")%></asp:Content>
<asp:Content ContentPlaceHolderID="ContentMain" runat="server" ID="Content1">
    <div class="form-div">
        <img src="../images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <%=GetLangString("OptionFieldType")%>：<asp:DropDownList ID="dplAttrType" runat="server">
        </asp:DropDownList>
        <%=GetLangString("OptionName")%>：<asp:TextBox ID="txtAttrName" runat="server"></asp:TextBox>
        <asp:Button ID="btFilter" runat="server" CssClass=" button" OnClick="btFilter_Click" />
        <asp:Button ID="btNoFilter" runat="server" CssClass=" button" OnClick="btNoFilter_Click" />
    </div>
    <div class="list-div">
        <asp:GridView ID="grdPOption" runat="server" CssClass="grid" AutoGenerateColumns="False"
            PageSize="15" DataKeyNames="OptionID" OnRowCommand="grdPOption_RowCommand" HorizontalAlign="Left"
            GridLines="Horizontal">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <%=GetLangString("OptionName")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#Eval("OptionName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="150" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("FieldType")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#GetOptionType(Eval("FieldType").ToString())%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle Width="80" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("Operation")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <a href='POption_Add.aspx?Act=Edit&OptionId=<%#DataBinder.Eval(Container.DataItem, "OptionID")%>'
                            title='<%#GetLangString("Edit")%>'>
                            <img src="../images/icon_edit.gif" /></a>
                        <asp:ImageButton ID="btnDelete" runat="server" ToolTip='<%#GetLangString("Delete")%>'
                            CommandName="DeleteEvent" CommandArgument='<%#Eval("OptionID")%>' ImageUrl="~/Admin/images/icon_drop.gif"
                            OnClientClick="return deleteConfirm()" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </asp:GridView>
        <div class="pager-div">
            <ux:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="right" PageIndexBoxType="DropDownList"
                OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" NavigationButtonType="Image"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
</asp:Content>
